Skip to content

Conversation

@javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Dec 30, 2025

Close #158

Summary by CodeRabbit

  • Tests

    • Updated assertions for stronger validation and modern matchers.
    • Switched test routes/annotations to instrumented/legacy variants.
    • Added test initializer to register instrumented test views and a service entry to enable it.
  • Chores

    • Bumped a test dependency version.
    • Adjusted license plugin exclusions for packaging.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 30, 2025

Walkthrough

Switches test routes and client-callable annotations to instrumented/legacy variants, relaxes header assertions to substring matching, adds a test service initializer registering instrumented routes, updates test copyright years, and bumps a testbench dependency and license-plugin excludes in the POM.

Changes

Cohort / File(s) Summary
Build / POM
pom.xml
Updated dependency com.flowingcode.vaadin.test:testbench-rpc 1.3.0 → 1.4.0; added license-maven-plugin excludes for /main/dev-bundle/**, /main/bundles/**, /main/frontend/**.
Test annotation refactor (routes & client-callables)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java, src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java, src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java, src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java
Replaced @Route@InstrumentedRoute and @ClientCallable@LegacyClientCallable; adjusted imports accordingly; removed Vaadin Route/ClientCallable imports.
Test assertion semantics
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
Replaced exact equality assertions (assertEquals) with Hamcrest substring checks (assertThat(..., containsString(...))); updated imports; updated copyright year to 2022–2026.
Service initializer registration
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java, src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
Added ViewInitializerImpl extending InstrumentationViewInitializer that registers instrumented routes for the test views; added service provider entry to META-INF descriptor.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • mlopezFC
  • paodb

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: make tests compatible with Vaadin 25' clearly and directly describes the main change in the pull request.
Linked Issues check ✅ Passed The PR successfully addresses issue #158 by fixing HeaderFooterStylesIT test failures and making tests compatible with Vaadin 25 through annotation updates and assertion modifications.
Out of Scope Changes check ✅ Passed All changes directly support Vaadin 25 compatibility: dependency updates, copyright years, annotation replacements, assertion updates, and test infrastructure changes are all within scope.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd58d99 and 5e45572.

📒 Files selected for processing (8)
  • pom.xml
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
  • src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
  • src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java
  • pom.xml
🧰 Additional context used
🧬 Code graph analysis (1)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (1)
  • SuppressWarnings (40-120)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (1)
  • SuppressWarnings (42-187)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-vaadin24
🔇 Additional comments (8)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java (2)

5-5: LGTM: Copyright year updated correctly.

The copyright year range has been appropriately updated to include 2026.


24-25: LGTM: Consistent migration to instrumented routing.

The migration from @Route/@ClientCallable to @InstrumentedRoute/@LegacyClientCallable is consistent with the Vaadin 25 compatibility effort. The view is properly registered in ViewInitializerImpl.serviceInit(), ensuring the instrumented route is initialized correctly.

Also applies to: 39-39, 89-89

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)

1-19: Previous issue resolved.

The license header now correctly identifies the project as "Grid Helpers Add-on". The issue flagged in the previous review has been addressed.


26-34: LGTM: Proper instrumented route registration.

The ViewInitializerImpl correctly extends InstrumentationViewInitializer and registers all four test views that have been migrated to use @InstrumentedRoute. This ensures the instrumented routes are properly initialized for Vaadin 25 compatibility testing.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java (2)

5-5: LGTM: Copyright year updated correctly.

The copyright year range has been appropriately updated to include 2026, consistent with other files in this PR.


25-26: LGTM: Consistent migration to instrumented routing.

The migration follows the same pattern as other test views in this PR. The view is properly registered in ViewInitializerImpl, ensuring correct initialization for Vaadin 25 compatibility.

Also applies to: 39-39, 63-63

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (2)

5-5: LGTM: Copyright year updated correctly.

The copyright year range has been appropriately updated to include 2026, maintaining consistency across all modified files.


26-27: LGTM: Consistent migration to instrumented routing.

The migration completes the systematic update of all test views to use @InstrumentedRoute and @LegacyClientCallable. This view is properly registered in ViewInitializerImpl, completing the Vaadin 25 compatibility migration for the test suite.

Also applies to: 43-43, 80-80


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd16955 and fd58d99.

📒 Files selected for processing (8)
  • pom.xml
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
  • src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
🧰 Additional context used
🧬 Code graph analysis (1)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (1)
  • SuppressWarnings (40-120)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (1)
  • SuppressWarnings (42-187)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-vaadin24
🔇 Additional comments (18)
pom.xml (1)

131-131: LGTM! Dependency version updated.

The testbench-rpc library has been updated to version 1.4.0, which aligns with the PR objective to support Vaadin 25 compatibility.

src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener (1)

1-1: LGTM! Service provider configuration added correctly.

This service descriptor properly registers the ViewInitializerImpl to enable instrumented route registration during test initialization.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java (3)

22-23: LGTM! Imports updated for Hamcrest assertions.

The switch from JUnit's assertEquals to Hamcrest's containsString matcher is appropriate for validating partial class attribute matches.


58-63: Excellent fix for Vaadin 25 compatibility!

Switching from exact class attribute matching to substring matching correctly addresses the test failures noted in issue #158. This accommodates the additional CSS classes that Vaadin 25 adds (e.g., "cell", "header-cell", "first-column-cell") while still verifying the custom classes are applied.


76-77: LGTM! Consistent assertion pattern applied.

The substring matching approach is consistently applied to handle Vaadin 25's additional CSS classes.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java (3)

24-25: LGTM! Annotations migrated to instrumented variants.

The migration from standard Vaadin annotations to instrumented variants enables proper test instrumentation for Vaadin 25 compatibility.


39-39: LGTM! Route annotation updated consistently.

The @InstrumentedRoute annotation works in conjunction with ViewInitializerImpl to register this test view properly.


89-89: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains RPC functionality while supporting the instrumented routing approach.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (1)

26-34: LGTM! Test initializer properly registers instrumented routes.

The ViewInitializerImpl correctly registers all four test views that have been migrated to use @InstrumentedRoute annotations, enabling proper test discovery and execution in Vaadin 25.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (3)

24-25: LGTM! Imports updated for instrumented annotations.

The imports align with the test infrastructure changes for Vaadin 25 compatibility.


41-41: LGTM! Route annotation migrated consistently.

The @InstrumentedRoute annotation is consistent with the other test views and properly registered in ViewInitializerImpl.


62-62: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains the RPC testing functionality.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java (3)

25-26: LGTM! Annotations migrated to instrumented variants.

The import changes support the instrumented routing pattern used throughout the test suite.


39-39: LGTM! Route annotation updated consistently.

The @InstrumentedRoute annotation follows the pattern applied to all test views in this PR.


63-63: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains RPC functionality with instrumentation support.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (3)

26-27: LGTM! Imports updated for instrumented routing.

The import changes complete the systematic migration of all test views to use instrumented annotations.


43-43: LGTM! Route annotation migrated to instrumented variant.

The @InstrumentedRoute annotation is properly registered in ViewInitializerImpl along with the other test views.


80-80: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains the RPC functionality required for integration testing.

@javier-godoy javier-godoy marked this pull request as draft January 2, 2026 12:17
@javier-godoy javier-godoy marked this pull request as ready for review January 2, 2026 12:46
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 2, 2026

@javier-godoy javier-godoy requested a review from paodb January 5, 2026 12:39
@paodb paodb merged commit b990af6 into master Jan 5, 2026
5 checks passed
@paodb paodb deleted the 20251230 branch January 5, 2026 15:09
@github-project-automation github-project-automation bot moved this from To Do to Pending release in Flowing Code Addons Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

Vaadin 25: HeaderFooterStylesIT integration tests fail

3 participants